#define  _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <math.h>
int main()
{
    int x1 = 0, y1 = 0;
    int x2 = 0, y2 = 0;
    scanf("%d %d", &x1, &y1);
    scanf("%d %d", &x2, &y2);
    int ret = pow(x1 - x2, 2) + pow(y1 - y2, 2);
    printf("%d", ret);
    return 0;
}